package com.th.supcom.pds.drugreturn.client.widget;

import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.extjs.gxt.ui.client.widget.form.FieldSet;
import com.th.supcom.pds.common.client.commom.FieldPanel;
import com.th.supcom.pds.internal.client.widget.MedicareCardField;

/**
 * 退药信息面板
 * 
 * @author yzhang
 */
public class DrugReturnInfoPanel extends FieldSet
{
    /** 门诊退药文本域集合. */
    private final DrugReturnAndRefundFields m_drugReturnAndRefundFields;
    /** 门诊退药按钮集合. */
    private final DrugReturnButtons m_drugReturnButtons;

    private final MedicareCardField m_medicareCardField;

    /**
     * 构造方法
     * 
     * @param drugReturnAndRefundFields
     * @param drugReturnButtons
     */
    public DrugReturnInfoPanel (final DrugReturnAndRefundFields drugReturnAndRefundFields, final DrugReturnButtons drugReturnButtons, final MedicareCardField medicareCardField)
    {
        m_drugReturnAndRefundFields = drugReturnAndRefundFields;
        m_drugReturnButtons = drugReturnButtons;
        m_medicareCardField = medicareCardField;
        initUI ();
    }

    /**
     * 初始化界面
     */
    private void initUI ()
    {
        setHeading ("退药信息");
        final FieldPanel pp = new FieldPanel ();
        pp.setLabelAlian ("L");

        pp.addCol (m_medicareCardField, 3, null, 50);
        pp.addCol (m_drugReturnAndRefundFields.getPrescNoField (), 3, null, 50);
        pp.addCol (m_drugReturnButtons.getQueryBtn (), 1, null, null);
        pp.addCol (new LayoutContainer (), 4, null, null);

        pp.newRow ();

        add (pp);
    }

}
